<!DOCTYPE html>
<html class="x-admin-sm" xmlns:th="http://www.thymeleaf.org">
<header th:replace="/admin/index::header-fragment"></header>
<link th:href="@{/layui-knifeZ/Content/Layui-KnifeZ/css/layui.css}" rel="stylesheet" />
<body >

<div class="layui-card-body ">
    <div class="layui-row">
    <form class="layui-form ">
        <div class="layui-form-item">
            <label for="L_username" class="layui-form-label">
                <span class="x-red">*</span>文章标题</label>
            <div class="layui-input-inline">
                <input type="text" id="L_username" name="username" required="" lay-verify="nikename" autocomplete="off" class="layui-input"></div>
        </div>
        <div class="layui-inline layui-show-xs-block">
            <input class="layui-input"  autocomplete="off" placeholder="开始日" name="start" id="start">
        </div>

        <div class="layui-inline layui-show-xs-block">
            <input type="text" name="username"  placeholder="请输入用户名" autocomplete="off" class="layui-input">
        </div>

        <div style="background: #c6e6c6">
            <textarea id="layeditDemo" ></textarea>
        </div>

            <button class="layui-btn" lay-filter="add" lay-submit="">增加</button></div>
    </form>
</div>

<script th:src="@{/layui-knifeZ/Content/Layui-KnifeZ/layui.js}"></script>
<script th:src="@{/layui-knifeZ/Content/ace/ace.js}"></script>
<script>
    layui.use(['layedit', 'layer', 'jquery'], function () {
        var $ = layui.jquery;
        var layedit = layui.layedit;
        layedit.set({
            //暴露layupload参数设置接口 --详细查看layupload参数说明
            uploadImage: {
                url: '/Attachment/LayUploadFile',
                accept: 'image',
                acceptMime: 'image/*',
                exts: 'jpg|png|gif|bmp|jpeg',
                size: '10240'
            }
            , uploadVideo: {
                url: '/Attachment/LayUploadFile',
                accept: 'video',
                acceptMime: 'video/*',
                exts: 'mp4|flv|avi|rm|rmvb',
                size: '20480'
            }
            //右键删除图片/视频时的回调参数，post到后台删除服务器文件等操作，
            //传递参数：
            //图片： imgpath --图片路径
            //视频： filepath --视频路径 imgpath --封面路径
            , calldel: {
                url: '/Attachment/DeleteFile'
            }
            //开发者模式 --默认为false
            , devmode: true
            //插入代码设置
            , codeConfig: {
                hide: true,  //是否显示编码语言选择框
                default: 'javascript' //hide为true时的默认语言格式
            }
            , tool: [
                'html', 'code', 'strong', 'italic', 'underline', 'del', 'addhr', '|', 'fontFomatt', 'colorpicker', 'face'
                , '|', 'left', 'center', 'right', '|', 'link', 'unlink', 'image_alt', 'video', 'anchors'
                , '|', 'fullScreen'
            ]
            , height: '90%'
        });
        var ieditor = layedit.build('layeditDemo');
    })
</script>
</body>
</html>
